package com.ds.infrastructure.hyperspace.console.entity.enums;

/**
 * @author: yaozhendong
 * @create: 2019-11-04 10:45
 **/

public enum MetricsAggregateFunctionEnum implements IMetricsAggregateFunction {
    SUBTRACTION("当前指标减去前一分钟的指标") {
        @Override
        public Long function(Long currentMetricsValue, Long preMetricsValue) {
            return currentMetricsValue - preMetricsValue;
        }
    },
    SAME("与当前指标相同") {
        @Override
        public Long function(Long currentMetricsValue, Long preMetricsValue) {
            return currentMetricsValue;
        }
    };

    private final String desc;

    MetricsAggregateFunctionEnum(String desc) {
        this.desc = desc;
    }
}
